package com.lmx.healthcode.util;

import android.widget.Toast;

import com.lmx.healthcode.base.MyApp;

/**
 * @author Leung
 * @date 2020/9/12 20:32
 */
public class ToastUtil {

    private static Toast toast;

    private ToastUtil() { }

    public static void showToast(String message) {
        if (toast == null) {
            toast = Toast.makeText(MyApp.getInstance(), message, Toast.LENGTH_SHORT);
        } else {
            toast.setText(message);
        }
        toast.show();
    }

}
